package ii.zjf.week4.count;

import java.util.concurrent.CountDownLatch;

public class Add3 extends BaseAdd {

    public static void main(String[] args) throws InterruptedException {


        CountDownLatch countDownLatch = new CountDownLatch(1);

        Thread thread = new Thread(() -> {

            count.add();
            countDownLatch.countDown();
        });

        thread.start();

        countDownLatch.await();

        System.out.println("success : " + count.getCount());

    }
}
